package com.dream.xiaobo.dao;

import com.dream.xiaobo.entity.Product;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @author xiaobo
 * @date 2021/8/31 - 13:26
 */
public interface ProductDao {

    Long selectCountBytId(String tId) throws SQLException;

    List<Product> selectProductByPage(String tId,Integer page,Integer pageSize) throws SQLException;

    /**
     * 根据商品Id查询商品信息
     * @param pId
     * @return
     * @throws SQLException
     */
    Product selectProductByPId(String pId) throws SQLException;

    List<Product> selectProduct() throws SQLException, InvocationTargetException, IllegalAccessException;

    void insertProduct(Product product) throws SQLException;
}
